<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head> 
        <script type="text/javascript" src="<%=request.getContextPath()+"/js/js/prototype.js"%>"></script>
        <script type="text/javascript" src="<%=request.getContextPath()+"/js/js/sevde.js"%>"></script>
        <link href="<%=request.getContextPath()%>/css/componentes.css" rel="stylesheet" type="text/css">
        <link href="<%=request.getContextPath()%>/css/miestilo.css" rel="stylesheet" type="text/css">
        <script language="javascript" type="text/javascript" src="<%=request.getContextPath()%>/js/jquery/jquery.js"></script>
        <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery/jquery.tablesorter.js"></script>
        <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery/jquery.tablesorter.pager.js"></script>

        <script type="text/javascript">
            $(function() {
                $("#tableOne")
                .tablesorter({
                    widthFixed: true,
                    widgets: ['zebra'],
                    headers: {
              
                        1: {sorter: false},
                        2: {sorter: false},
                        3: {sorter: false}
                        
                    }
                })
                .tablesorterPager({container: $("#pager"),positionFixed: false});
            });
        </script>



    </head>
    <body style="background-color: #eee" >

        <div align="center">



            <html:form action="a_formEvaluacionObj" >

            <html:hidden property="intId_posc" styleId="intId_posc" />
            <table  align="center" >
                     <input type="hidden" name="method" />
                    <tr class="Subtitulo">
                        <td>
                            Busqueda de Personal Subordinado
                        </td>
                    </tr>
                    <tr align="left" >
                        <td class="labelCampos" >
                            <bean:message key="fevaluacionobj.nombre" />
                        </td>
                        <td>
                            <html:text property="strNombre" />
                        </td>

                    </tr>
                    <tr align="left" >
                        <td class="labelCampos" >
                            <bean:message key="fevaluacionobj.sociedad" />
                        </td>
                        <td>
                            <html:select property="strSociedad" onchange="fillDivision(this.value,this.name);" styleId="strSociedad">
                                <html:option value="">-Seleccione-</html:option>
                                <html:options collection="lstSociedad" property="strIdOpcion"  labelProperty="strDescripcion" />
                            </html:select>

                        </td>

                    </tr>
                    <tr align="left">
                        <td class="labelCampos" >
                            <bean:message key="fevaluacionobj.division" />
                            
                        </td>
                        <td>
                            <html:select property="strDivision"  styleId="strDivision" onchange="fillDivision(this.value,this.name);" >
                                <html:option value="">-Seleccione-</html:option>


                            </html:select>
                        </td>


                    </tr>
                    <tr align="left">
                        <td class="labelCampos" >
                            <bean:message key="fevaluacionobj.subdivision" />
                        </td>
                        <td>
                            <html:select property="strSubDivision"  styleId="strSubDivision">
                                <html:option value="">-Seleccione-</html:option>
                            </html:select>
                        </td>
                        

                    </tr>


                </table>


                <tr>
                    <td>



                        <table cellspacing="0" cellpadding="0" align="center" border="0" class="tableToolBar" width="500px">
                            <tr bgcolor="#D6E3F2">

                                <td align="right">
                                    <c:if test="${!empty lstUsuario}">
                                        <div id="pager" class="pager">
                                            <img alt="" src="<%=request.getContextPath()%>/images/jquery_table/first_old_2.png" class="first"/>
                                            <img alt="" src="<%=request.getContextPath()%>/images/jquery_table/prev_old_2.png" class="prev"/>
                                            <input type="text" class="pagedisplay selectSmall" style="text-align: center;width: 30px"/>
                                            <img alt="" src="<%=request.getContextPath()%>/images/jquery_table/next_old_2.png" class="next"/>
                                            <img alt="" src="<%=request.getContextPath()%>/images/jquery_table/last_old_2.png" class="last"/>
                                            <select class="pagesize selectSmall">
                                                <option selected="selected" value="10">10</option>
                                                <option value="20">20</option>
                                                <option  value="30">30</option>
                                            </select>
                                        </div>
                                    </c:if>
                                </td>
                            </tr>
                        </table>


                        <table id="tableOne" cellspacing="1" align="center" border="0" class="tablesorter" style="width: 500px" >
                            <c:if test="${!empty lstUsuario}">
                                <thead>
                                    <tr>
                                        <th width="10%"><div align="center">ID</div></th>
                                        <th width="10%"><div align="center">Nombre</div></th>
                                        

                                    </tr>
                                </thead>
                                <tbody>
                                    <c:forEach var="jbean" items="${lstUsuario}">
                                         <tr>
                                             <td align="center" >
                                                <c:out value="${jbean.intId_posc}" />
                                            </td>
                                            <td align="center" >

                                                <a href="#"  onclick="clickLink('<c:out value="${jbean.intId_posc}" />','<c:out value="${jbean.intId_posc}" />','<c:out value="${jbean.strNombre}  ${jbean.strApaterno} " />')"  >
                                                    <c:out value="${jbean.strNombre} ${jbean.strApaterno}" /></a>



                                            </td>
                                            


                                        </tr>
                                    </c:forEach>
                                </tbody>
                            </c:if>
                            <c:if test="${empty lstUsuario}">
                                <div align="center" class="label">NO SE ENCONTRARON REGISTROS</div><br>
                            </c:if>
                                

                        </table>
                        <div >
                            <tr>
                                <td align="center">
                                        <input type="button" value="Buscar" onclick="buscar();" />
                                    </td>
                                </tr>
                        </div>

                    </td>
                </tr>

            </html:form>
        </div>
        <script type="text/javascript" >

            function buscar(){
                 document.forms[0].method.value='Busqueda';
                 document.forms[0].submit();

            }

            function clickLink(obj){

                document.forms[0].method.value='IrEvaluacionObjetivos';
                document.forms[0].elements("intId_posc").value=obj;
                document.forms[0].submit();

            }


        </script>
    </body>


</html>









